import React from 'react'
import '../../assets/css/tabber.css'

const tabberPic = ['home','nor','find','cart','personalCenter'];
const tabberUrl = tabberPic.map(i => require('../../assets/img/' + i + '.png'));
console.log(tabberUrl);

class TabberList extends React.Component{
  constructor(props) {
    super(props)
  }
  render() {
    return (
        <ul>
            { this.props.list.map((i,idx) => {
                <li key={idx} className="tabberlist">
                    <img src={tabberUrl[i]}></img>
                    <span>{i}</span>
                </li>
            })}
        </ul>
        // this.props.list.map((i,idx) => {
        //     <div key={idx} className="tabberlist">
        //         <img src={tabberUrl[i]}></img>
        //         <span>{i}</span>
        //     </div>
        // })
    )
  }
}
export default TabberList